<?php
class Zend_View_Helper_Comite extends Zend_View_Helper_Abstract
 {
       

        public function comite($tipo,$title,$msg)
        {
          switch($tipo){
            case('aprobado'): 
                return $this->aprobado($msg,$title);
            case('rechazado'): 
                return $this->rechazado($msg,$title);
            case('visto'): 
                return $this->visto($msg,$title);
          }
          
        }
        
   
        
        public function rechazado($msg,$title){
            $error='
            	<div class="atencion ui-state-error"> 
            	<p><span class="ui-icon ui-icon-circle-close" style="float: left;"></span> 
            	<strong>%s</strong>
                <div style="clear:both"></div>
                %s
            	</p>
            	</div>';
             return sprintf($error,$this->view->translate($title),$this->view->text($msg));
            
        }
    
        public function aprobado($msg,$title){
                if(is_null($title)) $title='Atención:';
            
               $ok='
            	<div class="atencion ui-state-highlight" > 
            	<p><span class="ui-icon ui-icon-circle-check" style="float: left;"></span>
                <strong>%s</strong>
                <div style="clear:both"></div>
                    %s
            	</p>
            	</div>
            ';
            
    
            
            return sprintf($ok,$this->view->translate($title),$this->view->text($msg));
        }
        
            
        public function visto($msg,$title){
                if(is_null($title)) $title='Visto:';
            
               $ok='
            	<div class="atencion ui-state-highlight" > 
            	<p><span class="ui-icon ui-icon-circle-check" style="float: left;"></span>
                <strong>%s</strong>
                <div style="clear:both"></div>
                    %s
            	</p>
            	</div>
            ';
            
    
            
            return sprintf($ok,$this->view->translate($title),$this->view->text($msg));
        }

        
        
        
        
}